import request from './request'

//获取验证码
export function sendCheckCode(data) {
	return request({
		'url': '/app/sendCheckCode',
		method: 'post',
		headers: {
			isToken: false
		},
		'data': data
	})
}

//验证码登录
export function loginByCode(data) {
	return request({
		'url': '/app/smsLogin',
		method: 'post',
		headers: {
			isToken: false
		},
		'data': data
	})
}

//蒙煤宝手机登录 username:手机号
export function getTokenMmb(data) {
	return request({
		'url': '/getTokenMmb',
		method: 'post',
		headers: {
			isToken: false
		},
		'data': data
	})
}
//小程序油站推荐列表
export function stationlistPage(query) {
	return request({
		url: '/business/station/listPage',
		method: 'get',
		params: query
	})
}

//司机---订单列表
export function listDriver(query) {
	return request({
		url: '/business/oilOrder/listDriver',
		method: 'get',
		params: query
	})
}
//司机---订单列表卡片本月统计
export function monthCardCount(query) {
	return request({
		url: '/business/oilOrder/monthCardCount',
		method: 'get',
		params: query
	})
}

//获取所有油品名称
export function getOilAllName(query) {
	return request({
		url: '/business/oil/getOilAllName',
		method: 'get',
		params: query
	})
}

// 获取油站详细信息
export function stationDetail(id) {
	return request({
		url: '/business/station/' + id,
		method: 'get'
	})
}

//根据油站获取油品
export function getOilByStationId(query) {
	return request({
		url: '/business/oil/getOilByStationId',
		method: 'get',
		params: query
	})
}

//获取优惠后的金额
export function getAmount(query) {
	return request({
		url: '/business/station/getAmount',
		method: 'get',
		params: query
	})
}

//司机---创建订单
export function addDriver(data) {
	return request({
		url: '/business/oilOrder/addDriver',
		method: 'post',
		data: data
	})
}

//司机---订单详情
export function detailsDriver(query) {
	return request({
		url: '/business/oilOrder/detailsDriver',
		method: 'get',
		params: query
	})
}


// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
	return request({
		url: '/system/dict/data/type/' + dictType,
		method: 'get'
	})
}

//退款原因列表
export function refuseList(query) {
	return request({
		url: '/business/paramConfigurate/list',
		method: 'get',
		params: query
	})
}
export function refundReasonList(query) {
	return request({
		url: '/business/oilOrder/refundReasonList',
		method: 'get',
		params: query
	})
}

//司机---申请退款
export function requestRefundDriver(data) {
	return request({
		url: '/business/oilOrder/requestRefundDriver',
		method: 'post',
		data: data
	})
}

//司机---退款进度列表
export function refundLogList(query) {
	return request({
		url: '/business/oilOrder/refundLogList',
		method: 'get',
		params: query
	})
}

//司机---退款撤销
export function revokeRefundDriver(query) {
	return request({
		url: '/business/oilOrder/revokeRefundDriver',
		method: 'get',
		params: query
	})
}

//司机---刷新核销码
export function refreshCode(id) {
	return request({
		url: '/business/oilOrder/refreshCode/' + id,
		method: 'get'
	})
}